IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'spTsetup_Update')
	BEGIN
		PRINT 'Dropping Procedure spTsetup_Update'
		DROP  Procedure  spTsetup_Update
	END

GO

PRINT 'Creating Procedure spTsetup_Update'
GO
Create Procedure dbo.spTsetup_Update
	( 	  
		@PICKLIMIT decimal = null, 
		@MAXDAYS decimal = null, 
		@MAXREQ decimal = null, 
		@SENDMAIL bit = null, 
		@SMTPIP char(16) = null, 
		@SENDEREMAIL char(40) = null, 
		@SENDERNAME char(40) = null, 
		@SENDSTSERR bit = null, 
		@SENDSTSTO char(80) = null, 
		@RETWARN bit = null, 
		@PICKFOLDER decimal = null, 
		@QCLETBODY text = null, 
		@ORDERNO int = null, 
		@ORDERTOEMAIL char(40) = null
	)
AS
  /* 
    ------------------------------------------------------------------------------
    - Change History
    - --------------
    - Date          Description
    ------------------------------------------------------------------------------
    - 8/29/2007    Initial version Updated
    ------------------------------------------------------------------------------
  */

	-- Declare the required variables

	-- Update the required new record
	UPDATE Tsetup
	SET
		MAXDAYS = @MAXDAYS, 
		MAXREQ = @MAXREQ, 
		SENDMAIL = @SENDMAIL, 
		SMTPIP = @SMTPIP, 
		SENDEREMAIL = @SENDEREMAIL, 
		SENDERNAME = @SENDERNAME, 
		SENDSTSERR = @SENDSTSERR, 
		SENDSTSTO = @SENDSTSTO, 
		RETWARN = @RETWARN, 
		PICKFOLDER = @PICKFOLDER, 
		QCLETBODY = @QCLETBODY, 
		ORDERNO = @ORDERNO, 
		ORDERTOEMAIL = @ORDERTOEMAIL		
	WHERE PICKLIMIT = @PICKLIMIT

	-- Return to calling method
	RETURN
	
GO
